/*
 * @Author: cygao
 * @Date: 2018-11-17 23:08:25
 * @Last Modified by: cygao
 * @Last Modified time: 2018-11-25 22:57:09
 */

import React, { Component } from 'react';
import {Link} from 'react-router-dom';
import './orderList.less';

export default class Register extends Component {
    constructor() {
        super()
    }
    //挂载前
    componentWillMount(){
      console.log(this.props);
    }
    render() {
        return (
            <div className={this.props.listClass}>
              {this.props.data.map((item, index) => {
                 var url = `/gDetail/${item.num_iid}`;
                 return  <Link to={url}
                         className="list-item1">
                           <div class="time-content"><div className="time-fl">订单号：{item.trade_parent_id}</div><div className="time-fr">{item.tk_status}</div></div>
                           <img className="item-img" src={item.pict_url} alt=""/>
                           <div className="item-content">
                             <div className="item-title">
                               <img className="title-logo" src={item.pict_url} alt=""/>
                               <div className="title-text">{item.item_title}</div>
                             </div>
                             <div class="item-time">创建日：{item.create_time}</div>
                             <div className="item-middle">
                                <div className="item-coupon1">消费金额：{item.alipay_total_price}</div>
                                <div className="item-commission">预估佣金：{item.forecast_commission}</div>
                             </div>
                           </div>
                         </Link>
              })}
            </div>
        )
    }
}
